<?
//引入所有子系统信息
include_once("../../../common/script/extender_import.php");

//获取板块的设置
include_once("model/setting.php");



//根据页面数量信息，筛选信息，创造url，供页码,跳转等使用
include_once("script/set_url.php");


//此处需做判断，网点人员只能申请修改信息，后台人员做审核
//所以要分辨出当前用户是否具有权限

$trans_nid = $_REQUEST ['nid'];


    $detail=select_one_line_all_items($table_prefix.'department',"nid = '$trans_nid'");
    $parent=select_one_line_all_items($table_prefix.'department',"nid = '{$detail['parent_id']}'");



    //按结构输出部门的树
    $school_list=select_lines_all_items($table_prefix."department","nid desc","parent_id = 0","");

    //$school_list=transform_2darray_in_1darray_number_as_key($school_list,"name");

    //循环，查找数据库中，parent_nid = 当前的 nid的值
    foreach($school_list as $key=>$value){
        $school_list[$key][$value['name']]=select_lines_all_items($table_prefix."department","name asc",
            "parent_id = '{$value['nid']}'","");

        //循环，$school_list[$key]['grade'] 的数据，查找数据库中，parent_nid = 当前的 nid的值，记录在class
        foreach($school_list[$key][$value['name']] as $k=>$v){
            $school_list[$key][$value['name']][$k][$v['name']]=select_lines_all_items($table_prefix."department",
                "name asc","parent_id = '{$v['nid']}'","");
        }
    }

?>

